<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三列布局</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        /* .container {
            display: flex;
        }
        .left {
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .center {
            flex: 1;
            height: 200px;
            background-color: green;
        }
        .right {
            width: 200px;
            height: 200px;
            background-color: blue;
        } */

        .container {
            height: 200px;
            padding: 0 200px;
            /* margin: 0 200px; */
        }

        .left, .right {
            width: 200px;
            height: 200px;
            background-color: #6d9b2f;
        }

        .content {
            width: 100%;
            height: 200px;
            background-color: #d8a7a7;
        }

        .container div {
            float: left;
        }

        .left {
            margin-left: -200px; 
            position: relative;  
            left: -100%; 


            /* float: left; */
            /* margin-left: -200px; */
        }

        .right {
            margin-left: -200px; 
            position: relative; 
            right: -200px;


            /* float: right; */
            /* margin-right: -200px; */
        }
    </style>
</head>
<body>
    <!-- <div class="container">
        <div class="left">左边</div>
        <div class="center">中间</div>
        <div class="right">右边</div>
    </div> -->
    
    <div class="container">
        <div class="content">中间</div>
        <div class="left">左边</div>
        <div class="right">右边</div>
    </div>

</body>
</html>
